//固定资产标签打印功能


	function prn_lab_Preview() {	
	    var barcode=$.trim($("#Sn").val());
		var itemName=$.trim($("#Name").val());
		if ((barcode!="")&&(itemName!="")){
		  CreateLab();
	  	  LODOP.PREVIEW();		
		}else{
			alert("缺少条码或设备名称！");
		}
	};

	function CreateLab() {
	    var barcode=$.trim($("#Sn").val());
		var itemName=$.trim($("#Name").val());
		var itemDate=$.trim($("#StartTime").val());
		var UseOffice=$.trim($("#UseOffice").val());
		var sid=$.trim($("#Sn").val());
        
		if ((barcode!="")&&(itemName!="")){
		//SET_PRINT_PAPER(Top,Left,Width,Height,strPrintName)  功能：打印初始化、设定纸张整体偏移量、设定可视编辑区域大小
		//整数时缺省长度单位为px。字符型时可包含单位名：in(英寸)、cm(厘米) 、mm(毫米) 、pt(磅)、px(1/96英寸)，如“10mm”表示10毫米，不设置时（用PRINT_INIT初始化）缺省值为0
		LODOP.SET_PRINT_PAPER(0,0,300,200,"Print_"+sid);
		//SET_PRINT_PAGESIZE(intOrient, PageWidth,PageHeight,strPageName)
		//设定打印纸张为固定纸张或自适应内容高，并设定相关大小值或纸张名及打印方向。
		LODOP.SET_PRINT_PAGESIZE(1, "105mm","70mm","");
        LODOP.SET_PRINT_STYLE("FontSize",9);
        LODOP.ADD_PRINT_TEXT(20,30 ,390,25,"广州市人民政府外事办公室");
		LODOP.SET_PRINT_STYLEA(1,"FontSize",19);
		LODOP.ADD_PRINT_TEXT(55,120,200,20,"固定资产");
		LODOP.SET_PRINT_STYLEA(2,"FontSize",22);
        LODOP.ADD_PRINT_TEXT(95,30,250,20,"资产名称："+itemName);
		LODOP.SET_PRINT_STYLEA(3,"FontSize",15);
		LODOP.ADD_PRINT_TEXT(125,30,250,20,"购买日期："+itemDate);
		LODOP.SET_PRINT_STYLEA(4,"FontSize",15);
		LODOP.ADD_PRINT_TEXT(155,30,250,20,"使用部门："+UseOffice);
		LODOP.SET_PRINT_STYLEA(5,"FontSize",15);
		LODOP.ADD_PRINT_BARCODE(200,34,307,47,"128A",barcode);
		}else{
			alert("缺少条码或设备名称！");
		}
	};	
